package com.cn.service.server.PartsManagement.Impl;

import com.cn.bean.dto.BusinessProjectParameterItemMappingDto;
import com.cn.bean.pojo.PartsManagement.ComponentItemBasicInfoTable;
import com.cn.bean.pojo.lbj.ParameterItemTable;
import com.cn.bean.pojo.yw.*;
import com.cn.bean.vo.PartsManagement.ComponentItemClassification;
import com.cn.mapper.dao.db5.PartsManagement.BusinessProjectParameterItemMappingDao;
import com.cn.service.server.PartsManagement.BusinessProjectParameterItemMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BusinessProjectParameterItemMappingServiceImpl implements BusinessProjectParameterItemMappingService {
    @Autowired(required = false)
    private BusinessProjectParameterItemMappingDao parameterItemMappingDao;
    @Override
    public List<BusinessProjectParameterItemMappingMain> selectBusinessProjectParameterItemMappingMain(BusinessProjectParameterItemMappingMain mappingMain) {
        return parameterItemMappingDao.selectBusinessProjectParameterItemMappingMain(mappingMain);
    }

    @Override
    public List<BusinessMatterBasicInfoTable> selectBusinessMatterBasicInfoTable(BusinessMatterBasicInfoTable matterBasicInfoTable) {
        return parameterItemMappingDao.selectBusinessMatterBasicInfoTable(matterBasicInfoTable);
    }

    @Override
    public List<ComponentItemBasicInfoTable> selectComponentItemBasicInfoTable(ComponentItemBasicInfoTable componentItemBasicInfoTable) {
        return parameterItemMappingDao.selectComponentItemBasicInfoTable(componentItemBasicInfoTable);
    }


    @Override
    public List<ParameterItemTable> selectParameterItemTable(ParameterItemTable parameterItemTable) {
        return parameterItemMappingDao.selectParameterItemTable(parameterItemTable);
    }

    @Override
    public List<BusinessProjectParameterItemMappingSub> selectSub(int id) {
        return parameterItemMappingDao.selectSub(id);
    }

    @Override
    public int insertBusinessProjectParameterItemMappingMain(BusinessProjectParameterItemMappingMain mappingMain) {
        Boolean a=parameterItemMappingDao.insertBusinessProjectParameterItemMappingMain(mappingMain);
        if (a){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertBusinessProjectParameterItemMappingSub(BusinessProjectParameterItemMappingSub subTable) {
        Boolean b=parameterItemMappingDao.insertBusinessProjectParameterItemMappingSub(subTable);
        if (b){
            return 1;
        }
        return 0;
    }

    @Override
    public int delBusinessProjectParameterItemMappingMainStatus(int id) {
        Boolean c=parameterItemMappingDao.delBusinessProjectParameterItemMappingMainStatus(id);
        if (c){
            return 1;
        }
        return 0;
    }

    @Override
    public List<BusinessProjectParameterItemMappingDto> selectAll(BusinessProjectParameterItemMappingDto businessProjectParameterItemMappingDto) {
        return parameterItemMappingDao.selectAll(businessProjectParameterItemMappingDto);
    }

    @Override
    public int delBusinessProjectParameterItemMappingSub(int id) {
        Boolean d=parameterItemMappingDao.delBusinessProjectParameterItemMappingSub(id);
        if (d){
            return 1;
        }
        return 0;
    }

    @Override
    public Integer getBusinessProjectParameterItemMappingMainAutoid() {
        return parameterItemMappingDao.getBusinessProjectParameterItemMappingMainAutoid();
    }

    @Override
    public Integer getBusinessProjectParameterItemMappingSubAutoid() {
        return parameterItemMappingDao.getBusinessProjectParameterItemMappingSubAutoid();
    }

    @Override
    public int updateBusinessProjectParameterItemMappingMain(BusinessProjectParameterItemMappingMain mainTable) {
        Boolean e=parameterItemMappingDao.updateBusinessProjectParameterItemMappingMain(mainTable);
        if (e){
            return 1;
        }
        return 0;
    }
}
